<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/page/common/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>我的分页测试</title>
<script type="text/javascript">
	
</script>
</head>
<body>
<s:form action="/test1/listTest.do">
	<table width="25%" align="center" cellpadding="1" cellspacing="1"
		bgcolor="#CCCCCC">
		<tr align="center" height="30">
			<td colspan="2">查询</td>
		</tr>
		<s:hidden name="pageNoPara" value="1"></s:hidden>
		<input type="hidden" name="operateType" value="query" />
		<s:textfield name="value" id="value" label="value" />
		<s:submit value="查询" align="center"></s:submit>
	</table>
</s:form>
<p></p>

<div style="text-align: right;margin-right: 200px;">
<input type="button" value="新增" onclick="javascript:document.location.href='${ctx}/test1/addPage.do'" />
</div>

<div style="text-align:left; margin-left:200px;color: red;">${message }</div>
<p></p>
<table width="60%" align="center" cellpadding="1" cellspacing="1"
	bgcolor="#CCCCCC">
	<tr>
		<td align="center">id</td>
		<td align="center">value</td>
		<td></td>
		<td></td>
	</tr>
	<c:if test="${page.totalSize gt 0}">
		<c:forEach items="${page.result}" var="pageList">
			<tr height="10" align="center" valign="middle" bgcolor="#FFFFFF">
				<td align="center">${pageList.id }</td>
				<td align="center">${pageList.value }</td>
				<td><a
					href="${ctx}/test1/updatePage.do?id=${pageList.id }">更新</a></td>
				<td><a href="${ctx}/test1/deleteTest.do?id=${pageList.id }">删除 </a></td>
			</tr>
		</c:forEach>
	</c:if>

	<c:if test="${page.totalSize le 0}">
		<tr bgcolor="#FFFFFF">
			<td colspan="4" align="center">无记录</td>
		</tr>
	</c:if>
	<tr>
		<td colspan="4"></td>
	</tr>
	<tr>
		<td colspan="4" align="right"><!-- ${testresult } --></td>
	</tr>

	<tr>
		<td colspan="4" align="right">
			<page:paging goUrl="${ctx}/test1/listTest.do" pageUtil="${page}" />
		</td>
	</tr>
</table>
</body>
</html>